package qsou.rpc.framework.loadbalance;

import java.util.List;
import qsou.rpc.framework.common.extension.SPI;
import qsou.rpc.framework.remoting.dto.RpcRequest;

@SPI
public interface LoadBalance {
  /**
   * Choose one from the list of existing service addresses list
   *
   * @param serviceUrlList Service address list
   * @param rpcRequest
   * @return target service address
   */
  String selectServiceAddress(List<String> serviceUrlList, RpcRequest rpcRequest);
}